/**
* This file is part of tictionary.
*
* tictionary is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* You should have received a copy of the GNU General Public License
* along with dev.clipall.  If not, see <http://www.gnu.org/licenses/>.
*
* http://code.google.com/p/tictionary/
*/

package tictionary;

import java.io.DataOutputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import tictionary.dict.Constants;
import tictionary.dict.Utils;

/**
 *
 * @author Erol Hira
 */
public class AboutCreator implements Constants{

    public AboutCreator() {
        try {
            create();
        } catch (IOException e) {
            Logger.getLogger(AboutCreator.class.getName()).log(Level.SEVERE, null, e);
        }
    }        
    
    public static void main(String[] args){
        
        new AboutCreator();
    }

    private void create() throws FileNotFoundException, IOException {
        
        DataOutputStream out = new DataOutputStream(new FileOutputStream("out/zz.dat"));
        
        byte[] meanBytes = Utils.string2bytes(About.DEVELOPER);
        out.writeByte(meanBytes.length);
        out.write(meanBytes);
        
        meanBytes = Utils.string2bytes(About.DEV_MAIL);
        out.writeByte(meanBytes.length);
        out.write(meanBytes);
        
        meanBytes = Utils.string2bytes(About.DICT_OWNER);
        out.writeByte(meanBytes.length);
        out.write(meanBytes);
        
        meanBytes = Utils.string2bytes(About.NOTE);
        out.writeByte(meanBytes.length);
        out.write(meanBytes);
        
        out.flush();
        out.close();
    }
}
